#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int main()
{
    string s, src;
    while (cin >> s)
    {
        if (s.back() == '.')
            s.pop_back();
        if (s.size() > src.size())
            src = s;
    }
    cout << src << endl;
    return 0;
}